From: Jo-Philipp Wich Date: Mon, 19 Jun 2023 22:31:21 +0000 (+0200) Subject: luci-mod-network: fix incorrectly reverting vlan device name X-Git-Url: http://git.openwrt.org/%22https:/collectd.org//%22/%22https:/collectd.org/%22?a=commitdiff_plain;h=8824917be26413ae9558ec9f53616dda01c2a5bb;p=project%2Fluci.git luci-mod-network: fix incorrectly reverting vlan device name Fixes: #6435 Signed-off-by: Jo-Philipp Wich (cherry picked from commit b2546c26b5b33bf3f740149dc1a52a7ad3d6ee30) --- diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js b/modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js index 97bbf0ab5d..092bbbc14a 100644 --- a/modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js +++ b/modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js @@ -475,7 +475,7 @@ return baseclass.extend({ vid = this.section.formvalue(section_id, 'vid'), name = this.section.getUIElement(section_id, 'name_complex'); - if (base && vid && name && !name.isChanged()) { + if (base && vid && name && !name.isChanged() && isNew) { name.setValue('%s.%d'.format(base, vid)); name.triggerValidation(); }